package com.glsc.ngateway.common.api.oaflow.dto;

import com.alibaba.fastjson.annotation.JSONField;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @author houzhc
 * @description: TODO hzc
 * @date 2024年06月20日
 * @See http://10.197.49.32/glsc/projects/34/docs?directory=1703&page=1&program_id=34&scope=root
 */
@Data
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class XinYiParamDto {
    /**
     * 收款方信息
     */
    @JSONField(name = "REC_BANK_ACC_NAME")
    private String recBankAccName;

    @JSONField(name = "REC_BANK_CODE")
    private String recBankCode;

    @JSONField(name = "REC_BANK_ACC")
    private String recBankAcc;

    @JSONField(name = "REC_OPEN_BANK_NAME")
    private String recOpenBankName;

    @JSONField(name = "REC_BIG_BANK_ACC")
    private String recBigBankAcc;

    @Builder.Default
    @JSONField(name = "REC_PAY_CUR_TYPE")
    private String recPayCurType = "CNY";

    /**
     * 付款方信息
     */
    @Builder.Default
    @JSONField(name = "PAY_BANK_ACC_NAME")
    private String payBankAccName = "国联证券股份有限公司";

    @Builder.Default
    @JSONField(name = "PAY_BANK_CODE")
    private String payBankCode = "9999";

    @Builder.Default
    @JSONField(name = "PAY_BANK_ACC")
    private String payBankAcc = "32001618636052516617";

    @Builder.Default
    @JSONField(name = "PAY_OPEN_BANK_NAME")
    private String payOpenBankName = "中国建设银行股份有限公司无锡分行营业部";

    @Builder.Default
    @JSONField(name = "PAY_CUR_TYPE")
    private String payCurType = "CNY";

    /**
     * 日期信息
     */
    @JSONField(name = "SETTLE_DATE")
    private String settleDate;

    @JSONField(name = "OCCUR_DATE")
    private String occurDate;

    @JSONField(name = "FT_DATE")
    private String ftDate;

    /**
     * 付款备注
     */
    @JSONField(name = "NOTE")
    private String note;

    /**
     * 付款金额
     */
    @JSONField(name = "OCCUR_AMT")
    private String occurAmt;

    /**
     * 唯一id
     */
    @JSONField(name = "OUT_INST_ID")
    private String outInstId;

    private String productId;

    @JSONField(name = "SETTLE_SELF_FUND_CODE")
    private String settleSelfFundCode;

    @JSONField(name = "FT_DIRECT")
    private String ftDirect;

    private String methodName;

    @JSONField(name = "DATA_SOURCE")
    private String dataSource;

    @JSONField(name = "MKT_CODE")
    private String mktCode;

    @JSONField(name = "CUR_TYPE")
    private String curType;

    private String serviceName;

    @JSONField(name = "INST_CLASS_ID")
    private String instClassId;

    @JSONField(name = "SETTLE_SPEED")
    private String settleSpeed;

    @JSONField(name = "SETTLE_UNIT_ID")
    private String settleUnitId;

    @JSONField(name = "FUND_PROP")
    private String fundProp;

    @JSONField(name = "PAY_BIG_BANK_ACC")
    private String payBigBankAcc;

    public XinYiParamDto buildPayInfo(String payBankAccName, String payBankAcc, String payOpenBankName, String payBankCode){
        this.payBankAcc = payBankAcc;
        this.payBankCode = payBankCode;
        this.payOpenBankName = payOpenBankName;
        this.payBankAccName = payBankAccName;
        return this;
    }

    public XinYiParamDto buildRecInfo(String recBankAccName, String recBankAcc, String recOpenBankName, String recBankCode){
        this.recBankAcc = recBankAcc;
        this.recBankCode = recBankCode;
        this.recOpenBankName = recOpenBankName;
        this.recBankAccName = recBankAccName;
        return this;
    }

    public XinYiParamDto buildDateInfo(String settleDate, String occurDate, String ftDate){
        this.settleDate = settleDate;
        this.occurDate = occurDate;
        this.ftDate = ftDate;
        return this;
    }
}
